SET(TARGET "termit")

INCLUDE_DIRECTORIES(${TERMIT_SOURCE_DIR})

INCLUDE(Sources.cmake)

PKGCONFIG(gtk+-2.0 GTK_INCLUDE_DIR GTK_LIB_DIR GTK_LDFLAGS GTK_CFLAGS)

SET(TERMIT_CFLAGS ${GTK_CFLAGS})
SET(TERMIT_LDFLAGS "${GTK_LDFLAGS} ${VTE_LIBRARY}")

IF(DEBUG)
  SET(TERMIT_CFLAGS "${TERMIT_CFLAGS} -D DEBUG")
ENDIF(DEBUG)

SET_SOURCE_FILES_PROPERTIES(${TERMIT_SRCS} PROPERTIES 
  COMPILE_FLAGS "${TERMIT_CFLAGS}")

ADD_EXECUTABLE(${TARGET} ${TERMIT_SRCS})

SET_TARGET_PROPERTIES(${TARGET} PROPERTIES
  LINK_FLAGS "${TERMIT_LDFLAGS}")

INSTALL(TARGETS ${TARGET} DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)

